package com.cskaoyan.day01.link;

/**
 * @author stone
 * @date 2022/01/27 11:07
 */
public class LinkedDemo {

    public static void main(String[] args) {
        //先创建一些结点
        Node node1 = new Node("红"); //复制一行 → ctrl + d
        Node node2 = new Node("橙"); //复制一行 → ctrl + d
        Node node3 = new Node("黄"); //复制一行 → ctrl + d
        Node node4 = new Node("绿"); //复制一行 → ctrl + d
        Node node5 = new Node("青"); //复制一行 → ctrl + d
        Node node6 = new Node("蓝"); //复制一行 → ctrl + d
        Node node7 = new Node("紫"); //复制一行 → ctrl + d

        //alt + 鼠标拖选
        node1.next = node2;
        node2.next = node3;
        node3.next = node4;
        node4.next = node5;
        node5.next = node6;
        node6.next = node7;

        //单向循环链表
        node7.next = node1;
    }
}
